// 省略以上代码，只看最搞笑的部分

public string DeleteDiviceType(List<TBasicDeviceType> list)
{
    using lims_hnContext dbContext = new lims_hnContext();

    dbContext.Set<TBasicDeviceType>().UpdateRange(list);
    dbContext.SaveChanges();

    return "true";
}

// 函数调用
var data = DeleteDiviceType(list);
var requle = true;
if (data != "true")
{
    requle = false;
}

return requle;